using System;
using System.Collections.Generic;
using System.Text;
using DbConnection = System.Data.Common.DbConnection;
using OleDbFactory = System.Data.OleDb.OleDbFactory;
using ICloneable = System.ICloneable;

namespace SqlBuddy
{
    public class BuddyConnection: ICloneable
    {
        private DbConnection connection;
        private string name;

        public BuddyConnection()
        {
            name = "new connection";
            connection = OleDbFactory.Instance.CreateConnection();
        }

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public string ConnectionString
        {
            get { return connection.ConnectionString; }
            set { connection.ConnectionString = value; }

        }
        
        #region ICloneable Members

        public object Clone()
        {
            BuddyConnection myClone = new BuddyConnection();
            myClone.name = this.name;
            myClone.ConnectionString = this.ConnectionString;
            return (myClone);
        }

        #endregion
    }
}
